package com.minimalist.common.entity.lindi.vo.tradeapplicationcredit;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.minimalist.common.config.mybatis.bo.PageReq;
import io.swagger.v3.oas.annotations.media.Schema;


import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 11987
 */

@Schema(name = "林地指标交易平台_交易申请付款凭证查询实体")
public class LindiTradeApplicationCreditQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "creditName", description = "付款凭证名称", type = "string")
    private String creditName;

    @Schema(name = "creditType", description = "付款方式", type = "string")
    private String creditType;

    @Schema(name = "creditPayee", description = "收款方", type = "string")
    private String creditPayee;

    @Schema(name = "creditDate", description = "付款日期", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime creditDate;

    public LindiTradeApplicationCreditQueryVO() {
    }

    public LindiTradeApplicationCreditQueryVO(String creditName, String creditType, String creditPayee, LocalDateTime creditDate) {
        this.creditName = creditName;
        this.creditType = creditType;
        this.creditPayee = creditPayee;
        this.creditDate = creditDate;
    }

    public String getCreditName() {
        return creditName;
    }

    public void setCreditName(String creditName) {
        this.creditName = creditName;
    }

    public String getCreditType() {
        return creditType;
    }

    public void setCreditType(String creditType) {
        this.creditType = creditType;
    }

    public String getCreditPayee() {
        return creditPayee;
    }

    public void setCreditPayee(String creditPayee) {
        this.creditPayee = creditPayee;
    }

    public LocalDateTime getCreditDate() {
        return creditDate;
    }

    public void setCreditDate(LocalDateTime creditDate) {
        this.creditDate = creditDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        LindiTradeApplicationCreditQueryVO that = (LindiTradeApplicationCreditQueryVO) o;
        if (creditName != null ? !creditName.equals(that.creditName) : that.creditName != null) return false;
        if (creditType != null ? !creditType.equals(that.creditType) : that.creditType != null) return false;
        if (creditPayee != null ? !creditPayee.equals(that.creditPayee) : that.creditPayee != null) return false;
        if (creditDate != null ? !creditDate.equals(that.creditDate) : that.creditDate != null) return false;
        return true;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (creditName != null ? creditName.hashCode() : 0);
        result = 31 * result + (creditType != null ? creditType.hashCode() : 0);
        result = 31 * result + (creditPayee != null ? creditPayee.hashCode() : 0);
        result = 31 * result + (creditDate != null ? creditDate.hashCode() : 0);
        return result;
    }
}
